package com.ch.sys.controller;


import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ch.sys.utils.Response;

public class BaseController { 
	
	public static int SUCCESS = 200;
	public static int FAIL = 500;
	public static String ID = "id";
	public static String DATA = "data";
	public static String KEYWORD = "keyword";
	
	@ResponseBody
	@ExceptionHandler({Exception.class})   
    public Response exception(Exception e) {   
        Response response = Response.newResponse();
        response.error(e);
        return response;   
    }  
	
	 
}  

